/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ig.metrica.origenesdedatos;

import java.rmi.RemoteException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Hashtable;
import javax.ejb.FinderException;
import javax.naming.NamingException;

/**
 *
 * @author jsanchez
 */
public interface OrigenDeDatosBussines {


        public Integer getId() throws RemoteException;

        public void setId(Integer id) throws RemoteException;


        void setEntidad(String entidad) throws RemoteException;

	/**
	 * @uml.property  name="entidad"
	 */
	public String getEntidad() throws RemoteException;

	/**
	 * @uml.property  name="query"
	 */
	public String getQuery() throws RemoteException;

	/**
	 * @param query  The query to set.
	 * @uml.property  name="query"
	 */
	public void setQuery(String query) throws RemoteException;

	/**
	 * @uml.property  name="conexionPK"
	 * @uml.associationEnd
	 */
	public ConexionPK getConexionPK() throws RemoteException;

	/**
	 * @param conexionPK  The conexionPK to set.
	 * @uml.property  name="conexionPK"
	 */
	public void setConexionPK(ConexionPK pk) throws RemoteException;

	/**
	 * @param campos  The campos to set.
	 * @uml.property  name="campos"
	 */
	public void setCampos(String campos) throws RemoteException;

	/**
	 * @uml.property  name="campos"
	 */
	public String getCampos() throws RemoteException;
	/**
	 * @uml.property  name="campos"
	 */
        public Integer getConsecutivo()throws RemoteException;

        public void setConsecutivo(Integer consecutivo)throws RemoteException;
	/**
	 * @uml.property  name="arregloCampos"
	 */
        public void closePoolConnection() throws RemoteException;

	//public ArrayList getArregloCampos() throws RemoteException;

	public ArrayList obtenerDatos(String query) throws NamingException, FinderException, ClassNotFoundException, SQLException, RemoteException;

        public ArrayList obtenerDatos(String query,String driver,String URL,String user,String pass) throws NamingException, FinderException, ClassNotFoundException, SQLException, RemoteException;

        public Collection obtenerResultado(String query) throws NamingException, FinderException, ClassNotFoundException, SQLException, RemoteException;

	public ArrayList obtenerDatos(Hashtable obj) throws NamingException, FinderException, ClassNotFoundException, SQLException, RemoteException;

	public boolean ejecutarQuery(String query,String datasource) throws NamingException, FinderException, ClassNotFoundException, SQLException, RemoteException;

        public Collection findByAllDTO() throws NamingException, FinderException, ClassNotFoundException, SQLException, RemoteException;

        public boolean  eliminarConsulta(java.lang.Integer consecutivo)throws NamingException, FinderException, ClassNotFoundException, SQLException, RemoteException,Exception;



}
